package com.pojo;

import java.io.Serializable;
import java.sql.Timestamp;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class UserAndPassengerOrder implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = -5515090125300668044L;

	private Integer userAndPassengerOrder_id;
	private Integer passengerOrder_id;
	private Integer target_users_id;
	private Integer this_users_id;
	private Integer state_id;
	private String inTime;
	private float price;
	private float realPrice;
	private boolean isPay;
	
	public UserAndPassengerOrder(Integer passengerOrder_id,Integer target_users_id,Integer this_users_id,float price){
		super();
		this.passengerOrder_id=passengerOrder_id;
		this.target_users_id=target_users_id;
		this.this_users_id=this_users_id;
		this.state_id=2;
		this.price=price;
	}
	public UserAndPassengerOrder(Integer passengerOrder_id,Integer target_users_id,Integer this_users_id,Integer state_id){
		super();
		this.passengerOrder_id=passengerOrder_id;
		this.target_users_id=target_users_id;
		this.this_users_id=this_users_id;
		this.state_id=state_id;
	}
	
	public void setInTime(Timestamp inTime){
		this.inTime=inTime.toString().substring(0,inTime.toString().lastIndexOf("."));
	}
	
}
